home *** CD-ROM | disk | FTP | other *** search
/ WINMX Assorted Textfiles / Ebooks.tar / Text - Tech - OS - NT - security guide 12.txt < prev    next >
Text File  |  2003-09-27  |  6KB  |  102 lines

  1. NT security guideSection 12
  2. For Administrators Only
  3.  
  4. 12-1. How do I secure my server?
  5. 12-2. I'm an idiot. Exactly how do hackers get in?
  6.  
  7.  
  8.  
  9. 12-1. How do I secure my server?
  10. Upgrade to NT 4.0. 
  11.   Physically secure all servers. 
  12.   Disable remote logins to workstations. 
  13.   No dual booting. NT only on the harddrives, and format NTFS only. 
  14.   Remove the group Everyone from being able to read so much of the registry. 
  15.   Use Auditing. Heavily if Internet connected. 
  16.   Load the latest Service Pack (v.3 as of this writing will be out very soon). 
  17.   Make sure program file directories have just Read and Execute permissions. Try 
  18.   to separate public files from private files. 
  19.   Note the owners of directories. The owner can still change things inside a 
  20.   directory, despite permissions being reset. 
  21.   Go into User Manager and create a restrictive password policy. 
  22.   Disable the Last Logon username display. 
  23.   Add the domain administrator's global group to all of your workstation's local 
  24.   administrator group for control. 
  25.   Remove the "Access this computer from network" logon right from administrators 
  26.   on domain controllers. 
  27.   If you can, remove Scheduler service. 
  28.   Restrict access to certain executables you deem dangerous (possibly CMD.EXE or 
  29.   NTBACKUP.EXE if you are real paranoid). 
  30.   Re-read this FAQ and note every time you see "this attack won't work if the 
  31.   Sys Admin did..." and actually do it. 
  32.   Use a firewall. As a minimum, do not allow outside access to ports 135 through 
  33.   139 for both TCP and UDP. 
  34.   Put web, ftp, and any other public servers OUTSIDE the firewall, or in a DMZ 
  35.   between a couple of firewalls. 
  36.   Come to think of it, read a book on firewalls. 
  37.   Consider using "internal" firewalls if you need to secure certain servers from 
  38.   certain groups of users, i.e. protect the accounting server from the 
  39.   disgruntled marketing group. 
  40.   Use Jeremy Allison's PWAudit program to monitor the keys that PWDump accesses. 
  41.   This way you can logs attempts at grabbing the password. 
  42.   Read your logs. Daily. Use them as a guide, however don't blindly trust that 
  43.   every action is in the logs, and every action reflected in the logs should not 
  44.   be taken at face value. INVESTIGATE ODD THINGS. 
  45.   Run C2Config after you have adjusted the INF file to meet your needs. 
  46.   Regularly run virus scans, non-Microsoft-written security scanners, and your 
  47.   C2Config utility (if you initially used it). 
  48.   Subscribe to the mailing lists and read the newsgroups listed in section 10. 
  49.   Daily. Read the NT Security FAQ. Repeatedly. Read all the pages at www sites 
  50.   listed in section 10. Frequently. 
  51.   Read Hobbit's paper on CIFS. If it's too technical, hire a new Sys Admin. 
  52.   Don't panic, but be paranoid all the time. Take every security concern or 
  53.   oddball alert seriously. 
  54.  
  55.  
  56.  
  57. 12-2. I'm an idiot. Exactly how do hackers get in?
  58. I mentioned the World Star Holdings Inc. Cybertest '96 contest earlier in the 
  59. FAQ. I wish I could say that this contest involved some type of massive attack 
  60. rich in color and unbelievable hacking genius, but alas, it was too easy. Using 
  61. techiques outlined in this FAQ, I simply got a list of exported shares and 
  62. logged in as GUEST. I enjoyed trying to get past the special HTML scripting 
  63. language they were using, and only did it because I wanted the $50,000.00 prize 
  64. money. But I wasn't the first one in, and they changed the rules mid-contest 
  65. anyway. 
  66. Here's a scenario that pulls some of this together. 
  67.  
  68. The Exploit
  69. -----------
  70. The attacker has a copy of Samba on his Linux machine, and applied the patches 
  71. from Hobbit's paper making smbclient a little more dangerous. He starts looking 
  72. at his target innocent.nmrc.org. Using a port scanner he determines that ports 
  73. 135-139 are open, and suspects the box might be NT. 
  74. The target IP address is 10.10.10.2. So he tries his hack version of nmblookup 
  75. like so - 
  76.  
  77.     nmblookup -B 10.10.10.2 -S \*
  78. The name INNOCENT is returned, and this is plugged into the hacked smbclient 
  79. like so - 
  80.  
  81.     smbclient \\\\INNOCENT\\WINNT$ -I 10.10.10.2 -d 3 -n WHATEVER -m
  82.      LANMAN2 -U ADMINISTRATOR
  83. Note that the hacker is trying to access the C drive, is using debug level 3 to 
  84. see errors (and see how long before an error occurs), forged his computer's 
  85. name, and dummied down the passwords to try Lan Manager style (uppercase) only. 
  86. Several simple passwords are tried, and it looks like Administrator has not been 
  87. altered to lock out incorrect tries. However the usual easy passwords do not 
  88. work. The hacker is not frustrated. He decides to throw his uppercase dictionary 
  89. at it - 
  90.  
  91.     smbclient \\\\INNOCENT\\WINNT$ -I 10.10.10.2 -d 0 -n WHATEVER -m
  92.      LANMAN2 -U ADMINISTRATOR The hacked smbclient will continue until the dictionary file is exhausted, the 
  93. hacker stops the program, or he gets in. After a while, success. 
  94. The hacker uploads a trojan to \SYSTEM32 to capture passwords. Then the hacker 
  95. goes to \SYSTEM32\CONFIG\SAM and \REPAIR and finds copies of the SAM database. 
  96. These are copied down to his home machine. 
  97. The hacker disconnects and proceeds to use PWDump and L0phtcrack to get ALL 
  98. passwords. The hacker knows that some of the passwords might be old -- after 
  99. all, he couldn't grab the live SAM database. But between the old passwords and 
  100. the trojan, the hacker isn't even worried if the Administrator changes 
  101. passwords. The hacker will simply use another account name and check the \TEMP 
  102. directory for the collected passwords.